<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      var num = prompt('请输入数字');
      var result = num < 10 ? '小于10' : '大于或等于10';
      alert(result);
    </script>
  </body>
</html>